<?php
include '/var/www/html/new/d/common/header.html';
include '/var/www/html/new/d/common/left.html';
?>
<title>发布更新 - <?=$GLOBALS['web_title']?></title>
<link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/aliceui.min.css"/>
<link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/resetui.css"/>
<link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/noticet.css"/>
<style>
.tabHead {
padding-left: 5px;
overflow: hidden;
border-bottom: 2px solid #019be1;
}
.tabHead li.active {

color: black;
}
.tabHead li {
float: left;
height: 36px;
line-height: 36px;
font-size:1.2em;
cursor: pointer;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
</style>
<div class="r_content">
    <ul id="tabHead" class="tabHead clearfix"> 
		<li class="profit active">更新公告管理</li>
	</ul>
    <div class="send">
        <form id="ourfrm" action="" method="post">
            <input type="hidden" name="action" value="<?if($_GET['action']=="edit") echo "edit";else{echo "create";}?>"/>
            <input type="hidden" name="did" value="<?=$did?>"/>
            <input type="hidden" name="ResivePerson" value="<?=$total?>"/>
            <?=$adminHiddenInput?>
            <p>
                <span class="title">更新标题：</span>

                <input type="text" class="sendtxt" name="title" value=""/> 
            </p>  
            <p>
                <span class="title">更新内容：</span>
                <!-- <textarea id="detailInfo1" name="content" class="sendtare3" data-required="2" title="请输入" value=""></textarea> -->
				<input  type="text" class="sendurl" name="content"  title="请输入" value="">
                <!--<textarea name="content" class="sendtare"></textarea>-->
            </p>
            <input style="display: none;" id="id" name="id" value="<?=$_GET['id']?>"/>
            <p style="padding:10px 0 0 300px;clear: both;">
                <input type="button" class="ui-button ui-button-morange" id="submitBtn" value="提交" />
            </p>
        </form>
    </div>
</div>

<script>
// $(document).ready(function () {
 //   var ue = UE.getEditor('detailInfo1');
//}); 
$.ajax({
    url:'call/version.php',
    data:{action:'read',id:$("#id").attr("value")},
    dataType:'json',
    type:'POST',
    success:function(data) {
        $(".sendtxt").val(data['uplog_title']);
        $(".sendtare").val(data['uplog_content']);
    }
})
</script>
<?
$ueditor = (strpos($_SERVER['SCRIPT_URL'],'/new/d/')===0)?
    'ueditor_config_mini_note_two.js':'ueditor_config_mini_note_pft.js';
?>
<script>
   $("#submitBtn").click(function(){
		title = $(".sendtxt").val(); 
			 if(title==''){
				 alert('标题不能为空');
				 return false; 
			 }
        var postData = $("form#ourfrm").serialize();
		$.ajax({
            type:'POST',url: "call/version.php",data: postData, dataType:'json',
			})
           .done(function(res) {
                alert(res['msg']);
				location.href = "http://www.12301.cc/updata_notice.html";
               if(res['errcode']==1000) {
                    history.go(-1);
               }
            });
    });
</script>
<!-- <script type="text/javascript" src="http://www.12301.cc/ue_126/<?=$ueditor?>"></script>
<script type="text/javascript" src="http://www.12301.cc/ue_126/ueditor.all.min.js"></script> -->
<?php
include("/var/www/html/new/d/common/footer.html")?>
